
import java.io.*;
import java.util.*;

public class Main{
	public static void main(String[] args){
		try{
			File file=new File(args[0]);
			if(file.isFile()){
				System.out.println(args[0]+"file");
				System.out.println(file.canRead() ? "can read":"can't read");
				System.out.println(file.canWrite() ? "can write":"can't write");
				System.out.println(file.length() +" byte");
			}
			else{
				File[] files=file.listFiles();
				ArrayList<File> fileList=new ArrayList<File>();

				for(int i=0;i<files.length;i++){
					if(files[i].isDirectory()){
						System.out.println("["+files[i].getPath()+"]");
					}
					else{
						fileList.add(files[i]);
					}
				}

				for(File f:fileList){
					System.out.println(f.toString());
				}

				System.out.println();
			}


		}
		catch(ArrayIndexOutOfBoundsException e){
			System.out.println("must input path");

		}
	}
}